package com.dsp.bean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

public class MenuTree implements Serializable{
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private Long id ;
	private String icon;
	private String tag;
	private String url;
	private List<MenuTree> menus = new ArrayList<MenuTree>();
	
	public MenuTree(Long id , String icon , String tag , String url){
		this.id = id;
		this.icon = icon;
		this.tag = tag;
		this.url = url;
	}
	
	/**
	 * @return the id
	 */
	public Long getId() {
		return id;
	}
	/**
	 * @return the icon
	 */
	public String getIcon() {
		return icon;
	}
	/**
	 * @return the tag
	 */
	public String getTag() {
		return tag;
	}
	/**
	 * @return the menus
	 */
	public List<MenuTree> getMenus() {
		return menus;
	}
	/**
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}
	/**
	 * @param icon the icon to set
	 */
	public void setIcon(String icon) {
		this.icon = icon;
	}
	/**
	 * @param tag the tag to set
	 */
	public void setTag(String tag) {
		this.tag = tag;
	}
	/**
	 * @param menus the menus to set
	 */
	public void setMenus(List<MenuTree> menus) {
		this.menus = menus;
	}
	
	public void add(MenuTree mt){
		if (this.menus == null) {
			menus=  new ArrayList<MenuTree>();
		}
		this.menus.add(mt);
	}

	/**
	 * @return the url
	 */
	public String getUrl() {
		return url;
	}

	/**
	 * @param url the url to set
	 */
	public void setUrl(String url) {
		this.url = url;
	}
	
}
